package com.tools.cleanmaster.ui.card.animator;

import android.view.animation.Interpolator;

/**
 * 阻尼间补器
 * Created by wen.yu.gang on 2018/7/5
 */
public class DampingInterpolator implements Interpolator {

    private float mAngularVelocity = (float) (10 * Math.PI);

    public void setAngularVelocity(float av) {
        mAngularVelocity = av;
    }

    @Override
    public float getInterpolation(float input) {
        return (float) (1 + Math.pow(Math.E, -3 * input) * Math.cos(mAngularVelocity * input - Math.PI / 2));
    }

}
